package com.wqi.chapter6;

public class PlaceSetting extends Custom{
	Spoon sp;
	Fork frk;
	Knife kn;
	DinnerPlate p1;
	PlaceSetting(int i) {
		super(i);
		sp = new Spoon(i+2);
		frk = new Fork(i+3);
		kn = new Knife(i+4);
		p1 = new DinnerPlate(i+5);
		System.out.println("PlaceSetting Constructor");
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		PlaceSetting x = new PlaceSetting(9);

	}

}

class Plate{
	Plate(int i){
		System.out.println("Plate Constructor");
	}
}

class DinnerPlate extends Plate{

	DinnerPlate(int i) {
		super(i);
		System.out.println("DinnerPlate Constructor");
	}
	
}

class Utensil{
	Utensil(int i){
		System.out.println("Utensil Constructor");
	}
}

class Spoon extends Utensil{

	Spoon(int i) {
		super(i);
		System.out.println("Spoon Constructor");
	}
}

class Fork extends Utensil{

	Fork(int i) {
		super(i);
		System.out.println("Fork Constructor");
	}
	
}

class Knife extends Utensil{

	Knife(int i) {
		super(i);
		System.out.println("Knife Constructor");
	}
	
}

class Custom{
	Custom(int i){
		System.out.println("Custom Constructor");
	}
}
